<?php
namespace Admin\Controller;
use Think\Controller;
use Myself\FileSystem;
use Admin\Controller\CommonController;
class SetController extends CommonController {






        public function index(){
		header('Content-Type:text/html;charset=utf-8');
		
		//-----------------搜索-------------------
		$dataInfo = M('shop_admin_config')->find();
	        $this->assign('dataInfo',$dataInfo);
		$this->display('Set/index');
      }
	
	
	public  function  SaveEdit(){
	        $id  = I('packet_id');
        	$data['spread_cost'] = I('spread_cost');
	        $data['notice_cost'] = I('notice_cost');
		$data['packet_unit'] = I('packet_unit');
		$data['service_phone'] = I('service_phone');
			
		$result = M('shop_admin_config')->where('id="'.$id.'"')->save($data);
	         if( $result ){
			 $info = 100;
		         $this->ajaxReturn($info);
		 }
	
	
	
	}
	
	
	
	
	 public function checkStatus(){
	     $cid = I('cid');
	     $dataInfo = M('shop')->find($cid);
	     $data['check_status'] = 1;
	     $result = M('shop_detail')->where('shop_id="'.$dataInfo['shop_id'].'"')->save($data);
	     if( $result ){
		 $data = 100;
		 $this->ajaxReturn($data);
		 }
	 
	 }
	 
	 
	   public function savePoint(){
	     $cid = I('cid');
		 $data['point'] =  I('kd');
	     $cid = I('cid');
	     $dataInfo = M('shop')->find($cid);
	     $result = M('shop_detail')->where('shop_id="'.$dataInfo['shop_id'].'"')->save($data);
		 if( $result ){
		 $data = 100;
		 $this->ajaxReturn($data);
		 }
	 
	   }
}